package cn.janyd.jmall.system.rpc.admin.dto;

import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author janyd
 * @since 2020/8/14 21:02
 */
@Data
@Accessors(chain = true)
public class AdminCreateReqDTO implements Serializable {

    /**
     * 姓名
     */
    @NotEmpty(message = "姓名不可为空")
    private String name;

    /**
     * 邮箱
     */
    @Email(message = "邮箱格式不对")
    @NotEmpty(message = "邮箱不可为空")
    private String email;

    /**
     * 部门ID
     */
    @NotNull(message = "部门ID不可为空")
    private Integer departmentId;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 用户名
     */
    @NotEmpty(message = "用户名不可为空")
    private String username;

    /**
     * 密码
     */
    @NotEmpty(message = "密码不可为空")
    private String password;


}
